//统一管理接口地址
import axios from "@/request/request";
//引入qs模块
import qs from "qs"
//定义对应的接口
//精品推荐
export const JingPinAPI = () => axios.get("/products/recommend")
//热门兑换
export const ReMenAPI = () => axios.get("/products/hot")
//登录验证码
export const DengLyanzAPI = (pay) => axios.post("/sendSMS", qs.stringify(pay))
//手机号验证码登录
export const PhoneReginAPI = (pay) => axios.post("/phoneRegin", qs.stringify(pay))
//微信扫码登录
export const WeixinloginAPI = (pay) => axios.post("/wechatUsers/PCLogin", qs.stringify(pay))
//关联手机登录
export const BindingAPI = (pay) => axios.post("/wechatUsers/binding", qs.stringify(pay))
//获取用户信息
export const UserProfilesAPI = () => axios.get("/shop/userProfiles")
//根据id获取详情页
export const ProductsAPI = (id) => axios.get(`/products/${id}`)
//加入购物车
export const CartsaddAPI = (pay) => axios.post("/shop/carts/add", qs.stringify(pay))
//全部商品
export const GoodsSearchAPI = (params) => axios.get("/products",{params})
//查询购物车
export const ShopCartsAPI = (params) => axios.get("/shop/carts",{params})
//删除购物车            
export const DelAPI = (params) => axios.delete('/shop/carts?',{params})